package mg2d.equation;


public class TestProblem2 implements ConvDiffEqn {

	@Override
	public double p(double x, double y) {
		return 10d*(2d*y-1d)*(1d-x*x);
	}

	@Override
	public double q(double x, double y) {
		return -10d*y*(y-1d)*(1d-2d*x);
	}

	@Override
	public double u(double x, double y) {
		return Math.exp(-10d*(x-.5)*(x-.5)-y*y);
	}

	@Override
	public double f(double x, double y) {
		return p(x,y)*(-20d*(x-.5))*u(x,y)+q(x,y)*(-2d)*y*u(x,y)+(-20d)*u(x,y)+(-20d*(x-.5))*(-20d*(x-.5))*u(x,y)+(-2d)*u(x,y)+(4d)*y*y*u(x,y);
	}

}
